
BEGIN;

-- all findme users are assigned a
-- userid from this sequence
CREATE SEQUENCE users_userid_seq;

CREATE TABLE users (
       userid INTEGER NOT NULL DEFAULT nextval('users_userid_seq'::regclass),
       username TEXT NOT NULL UNIQUE,
       -- these can be filled in later, hence they are nullable
       email TEXT,
       picture_url TEXT,
       PRIMARY KEY ( userid ) );

INSERT INTO users( username, email, picture_url )
VALUES ('system_user', 'eric@gptoyz.com', 'dummy_picture');

COMMIT;
